<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="IncludeHeader.jsp"%>
<html>
  <head>
    <title>网上书店</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <link rel="stylesheet" type="text/css" href="<html:rewrite page="/style.css"/>">

  </head>
  <body>
<div class="content">
    <%@ include file="IncludeTop.jsp"%>
    <div class="left">
    	<div class="lt"></div>
		<div class="left_articles">
		[图书列表]
        <logic:present name="bookList" scope="request">
   			<logic:iterate id="book" collection="${ bookList.pageList }">
				<ul> 
					<li><b>${book.bookName}</b>:${book.publishCompany}</li>
				</ul>
			</logic:iterate>
		</logic:present>
		</div>
    </div>
   <div class="right">
    <logic:present name="bookList" scope="request">
   		<logic:iterate id="book" collection="${ bookList.pageList }">
		   	<div class="rt"></div>
			<div class="right_articles">
				<p><img src="img/image.gif" alt="Image" title="Image" class="image" />
				
				<ul>
					<li><b>书名：</b>${book.bookName}</li>
					<li><b>作者：</b>${book.author}</li>
					<li><b>出版社：</b>${book.publishCompany}</li>
					<li><b>出版日期：</b>${book.publishDate}</li>
					<li><b>所属分类：</b>${book.categoryName}</li>
					<li><b>售价：</b>${book.baseprice}</li>
					<li><b>折扣：</b>${book.discount*100}%</li>
					<li><b>购买价：${book.baseprice*book.discount}</b>
					<li>
					<input type="button" class="normalButton" value="加入购物车"
				onclick="window.location.href='<html:rewrite page="/cartAction.do?method=addItem&itemId=${book.itemId}"/>'" />
					</li>
					<li><b>说明：</b><p>${book.description}</p></li>
				</ul>
			</div>	
		</logic:iterate>
		<p>
			<logic:notMatch name="bookList" property="firstPage" value="true">
			<html:link href="bookAction.do?method=previousPage">[上一页]</html:link>
			</logic:notMatch>
			<logic:notMatch name="bookList" property="lastPage" value="true">
			<html:link href="bookAction.do?method=nextPage">[下一页]</html:link>
			</logic:notMatch>
			总共${ bookList.pageCount }页,当前第${ bookList.page+1 }页，每页显示${ bookList.pageSize }条数据
		</p>
	</logic:present>
   </div>
</div>
  </body>
</html>
